package gui;

import javax.swing.table.DefaultTableModel;

public class TableCleaner implements Runnable {

	private DefaultTableModel dm;

	public TableCleaner( DefaultTableModel dm ) {
		this.dm = dm;
	}

	public void run() {
		if( dm != null ) {
			int i = dm.getRowCount();
			while( i > 0 ) {
				dm.removeRow(i-1);
				i = dm.getRowCount();
			}
		}
	}
}
